﻿<UserControl x:Class="Chapters.Chapter09.ParallaxControl"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:Chapter09="clr-namespace:FSharp.Chapter9;assembly=FSharpLibrary">
	<UserControl.Resources>
		<ImageBrush x:Key="GradientBrush"
					ImageSource="/Resources;component/Chapter09/wall.jpg"
					TileMode="Tile"
					Viewport="0,0 64,191"
					ViewportUnits="Absolute" />
	</UserControl.Resources>
	<Border BorderThickness="40"
			BorderBrush="{StaticResource GradientBrush}"
			Width="745"
			Height="350">
		<Border BorderThickness="1"
				BorderBrush="DarkGoldenrod"
				Background="LightGoldenrodYellow"
				Padding="1">

			<Grid ClipToBounds="True">
				<Canvas x:Name="_canvas"
						Background="LightBlue"
						Chapter09:ParallaxHelper.ApplyParallax="True">
					<Image Source="/Resources;component/Chapter09/0_sun.png"
						   Canvas.Left="200" />
					<Image Source="/Resources;component/Chapter09/1_mountains.png"
						   Height="288" />
					<Image Source="/Resources;component/Chapter09/2_hill.png"
						   Height="287" />
					<Image Source="/Resources;component/Chapter09/3_wood.png"
						   Height="274" />
				</Canvas>
			</Grid>
			
		</Border>
	</Border>
</UserControl>
